A conventional error diffusion method has been known. According to this method, when an original image is converted into an image having tones fewer than that of the original image, an error between the tone value of each pixel in the converted image and the tone value of each pixel in the original image is diffused into surrounding pixels. This error diffusion method enables the diffusion of the error resulting from tone conversion into surrounding pixels, thus reducing a thickness irregularity in the converted image.
The basic principle of the above error diffusion method will be described based on FIGS. 9 to 12. In the following case, a halftone image having 256 tones is converted into an image expressed by binarized tone value of 0 or 255. In an original image shown in FIG. 9, the thickness value of any noted pixel is compared with a given threshold to convert the noted pixel's thickness value into 0 or 255. A noted pixel is shifted sequentially in processing, starting from the pixel at the left upper corner, proceeds in a main scanning direction, and, after the completion of the process for one line, proceeds to the next line along a subscanning direction. The threshold mentioned here is 128, which is the middle of 256 tones.
In the original image shown in FIG. 9, comparison between the thickness value 129 of the pixel at the left corner (noted pixel) and the threshold 128 demonstrates that the noted pixel's thickness value 129 is larger than the threshold 128, which causes the conversion of the noted pixel's thickness value into 255. This conversion of the noted pixel's thickness value from 129 into 255 produces an error (difference) of 255−129=126. The error is diffused into surrounding pixels on the basis of an error diffusion process table shown in FIG. 10. This example of error diffusion process table shows preset diffusion factors in a matrix form, and is used to allocate values given by multiplying the difference at the noted pixel by diffusion factors, to surrounding pixels.
When a 5×3 matrix form is employed for the error diffusion process table, as shown in FIG. 10, a range of error scattering is a matrix of 5×3. The diffusion factors in the error diffusion process table are so set that the sum total of the diffusion factors becomes 1 to maintain image thickness before and after the error diffusion process.
In FIG. 10, an allocation value for the pixel next on the right to the noted pixel is: 126(difference of the noted pixel)×10/64(diffusion factor of the next pixel)≈20 (figure below a decimal point is rounded off or down). The mathematical sign of the allocation value becomes reverse to that of the difference of the noted pixel to maintain the overall thickness of the image, thus −20 is added to the pixel next on the right to the noted pixel.
Calculating values to be allocated to surrounding pixels on the basis of the error diffusion process table in the above manner gives a result as shown in FIG. 11. Allocating the allocation values shown in FIG. 11 in the original image gives a result shown in FIG. 12.
Following the end of error diffusion on the first noted pixel, the pixel next on the right to the first noted pixel is taken to be a new noted pixel, which is subjected to error diffusion. The new noted pixel at this time has a thickness value 109, which is compared with the threshold 128. Subsequently, the same process as this process is carried out repeatedly. In this manner, error diffusion on every pixel is carried out as a noted pixel is shifted sequentially to convert the original image into an image having tones fewer than that of the original image.
When an error diffusion process on scanner data is carried out using a time between copy jobs, error diffusion on divided pieces of scanner data produces unnatural boundary lines between bands, as shown in FIG. 13. This is because that all accumulated error values including that on the last line just before the end of a band are cleared in carrying out error diffusion to make impossible the error diffusion for which thickness values including that on the last line are considered. An image having a thickness resulting in a larger error value, such as a halftone image, in particular, requires processing of a plurality of lines to achieve a proper error level.
A method for dealing with the above problem in processing different images through band changeover has been known. According to the method, error values stored in a line memory are evacuated to another large-capacity memory and the following band is processed. This method will be described based on a process flow shown in FIG. 14.
FIG. 14 is an explanatory flowchart of a conventional error diffusion processing method. An image processing apparatus first resets a FIFO (line memory) and an error diffusion block, in which error values are set (step S101), and sets a line number i=1 (step S102). The image processing apparatus then determines on whether a line to be processed is the head line on a page (step S103), and, when the line is the head line on the page (YES at step S103), reads ith line data of a band out of a large-capacity memory (step S104). When the line is not the head line on the page (NO at step S103), the image processing apparatus reads error values accumulated up to the previous error diffusion process out of the large-capacity memory, sets the read error values in the FIFO, and proceeds to step S104 (step S105).
The image processing apparatus then carries out the error diffusion process on the ith line of the band using the ith line data read out at step S104 (step S106), stores ith line print data in the large-capacity memory (step S107), sets i=i+1, and proceeds to the error diffusion process on the next line (step S108).
Subsequently, the image processing apparatus determines on whether the ith line is the end of the band (step S109). When the ith line is the end of the band (YES at step S109), the image processing apparatus stores error values set in the FIFO into the large-capacity memory (step S110). When the ith line is not the end of the band (No at step S109), the image processing apparatus returns to step S104 to repeat the same process.
According to the conventional method, the image processing apparatus reads error values accumulated up to the previous error diffusion process out of the large-capacity memory, sets the read error values in the FIFO, and then starts another error diffusion process. The method requires the image processing apparatus to transfer error values in the FIFO into the large-capacity memory at the end of the band. The image processing apparatus, therefore, must be provided with a controller for reading and writing error values, which is designed as a hardware circuit, thus increases a circuit scale in the image processing apparatus.
In contrast, for example, Japanese Laid-Open Patent Publication No. 2002-237952 suggests a method of using an error buffer to put each pair of adjacent bands in a mutual dependent relation through the error buffer in eliminating the unnaturalness of an image at a band boundary and rendering divided PDL (Page Description Language) data to a subpage consisting of a plurality of bands.
Japanese Laid-Open Patent Publication No. 2005-020733 suggests a method of allowing a pixel at a block boundary to receive an error allocation from an adjacent pixel in the same block in carrying out an error diffusion process on divided blocks.
According to the method using the error buffer, however, data evacuation and data call from the error buffer become a complicated process in handing over the data to the next band. The process described in Japanese Laid-Open Patent Publication No. 2002-237952 is limited to the PDL data rendering, and a unit of process for this method depends on PDL data. This method, therefore, is not applicable to a case where a band size is limited because of execution of an error diffusion process in a time between copy jobs. The process described in Japanese Laid-Open Patent Publication No. 2005-020733, on the other hand, puts a limitation on two-dimensional error allocation, allowing only the error allocation from a single pixel.